package cn.tedu.basic;

public class Test1_For {
    public static void main(String[] args) {
        for (int i = 10; i >= 0; i--) {
            System.out.println(i);
        }
        for (int i = 8; i <= 8888; i = i * 10 + 8) {
            System.out.println(i+",");
        }
        System.out.println();

        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            if(i%2 == 0){
                sum = sum + i;
            }
        }
        System.out.println("100以内的偶数和是："+sum);
        
        int count = 0;
        for (int i = 1; i <= 100; i++) {
            if (i % 2 == 1) {
                count++;
            }
        }
        System.out.println("100以内的奇数个数是："+count);
    }
}
